package com.qf.service.impl;

import com.qf.dao.CategoryDao;
import com.qf.dao.impl.CategoryDaoImpl;
import com.qf.entity.Category;
import com.qf.service.CategoryService;

import java.sql.SQLException;
import java.util.List;

public class CategoryServiceImpl implements CategoryService {
    private CategoryDao categoryDao = new CategoryDaoImpl();

    @Override
    public List<Category> selectAll() {
        try {
            return categoryDao.selectAll();
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
    }
}
